import { Controller, Get, Post, Body, Patch, Param, Delete } from '@nestjs/common';
import { DriverInfoService } from './driver_info.service';
import { CreateDriverInfoDto } from './dto/create-driver_info.dto';
import { UpdateDriverInfoDto } from './dto/update-driver_info.dto';

@Controller('driver-info')
export class DriverInfoController {
  constructor(private readonly driverInfoService: DriverInfoService) {}

  @Post()
  create(@Body() createDriverInfoDto: CreateDriverInfoDto) {
    return this.driverInfoService.create(createDriverInfoDto);
  }

  @Get()
  findAll() {
    return this.driverInfoService.findAll();
  }

  @Get(':id')
  findOne(@Param('id') id: string) {
    return this.driverInfoService.findOne(+id);
  }

  @Patch(':id')
  update(@Param('id') id: string, @Body() updateDriverInfoDto: UpdateDriverInfoDto) {
    return this.driverInfoService.update(+id, updateDriverInfoDto);
  }

  @Delete(':id')
  remove(@Param('id') id: string) {
    return this.driverInfoService.remove(+id);
  }
}
